<template>
       <div>
        <el-table
          :data="allUserData"
          style="width: 100%">
          <el-table-column type="expand">
            
            <template slot-scope="props">
              <div>
                <!-- <el-checkbox 
                  :indeterminate="props.row.isIndeterminate" 
                  v-model="props.row.checkAll" 
                  @change="tableCheckAll(props.row)">全选</el-checkbox>
                <div style="margin: 15px 0;"></div> -->

                <el-checkbox-group 
                  v-model="props.row.checkedCities" 
                  >
                  <el-checkbox v-for="city in props.row.cities" :label="city" :key="city">{{city}}</el-checkbox>
                </el-checkbox-group>
              </div>
            </template>

          </el-table-column>
          <el-table-column
            label="商品 ID"
            prop="id">
          </el-table-column>
          <el-table-column
            label="商品名称"
            prop="name">
          </el-table-column>
          <el-table-column
            label="描述"
            prop="desc">
          </el-table-column>
        </el-table>
</div>
</template>
<script>
export default {
  data(){
    return{

        allUserData:[
        {
          username:'zhangsan',
          userId:'001',
          isIndeterminate: false,
          checkAll: false,
          cities: ['上海', '北京', '广州', '深圳'],
          checkedCities:['上海', '北京'],
          id: '12987122',
          name: '好滋好味鸡蛋仔',
          category: '江浙小吃、小吃零食',
          desc: '荷兰优质淡奶，奶香浓而不腻',
          address: '上海市普陀区真北路',
          shop: '王小虎夫妻店',
          shopId: '10333'
        },
        {
          username:'lisi',
          userId:'002',
          isIndeterminate: true,
          checkAll: false,
          cities: ['上海', '北京', '广州', '深圳'],
          checkedCities:['北京'],
          id: '12987123',
          name: '好滋好味鸡蛋仔',
          category: '江浙小吃、小吃零食',
          desc: '荷兰优质淡奶，奶香浓而不腻',
          address: '上海市普陀区真北路',
          shop: '王小虎夫妻店',
          shopId: '10333'
        }
      ]
      
    }
  }
}
</script>